package com.itheima.property;

import java.util.Map;
import java.util.Properties;

/*
Properties 使用
propeties自己方法的使用
 */
public class Demo02 {

    public static void main(String[] args) {
        Properties map = new Properties();
        //        //增
        map.setProperty("马蓉","王宝强");
        map.setProperty("关晓彤","鹿晗");
        map.setProperty("唐艺昕","张若昀");
        System.out.println(map);

       //删

        //改
        map.setProperty("关晓彤","吴亦凡");
        System.out.println(map);
        //查
         System.out.println(map.getProperty("唐艺昕"));
        //遍历
     for (String o : map.stringPropertyNames()) {
            System.out.println(o+"~~~~"+map.getProperty(o));
        }




    }
}
